import { defineStore } from 'pinia'

export const useUserStore = defineStore('userStore', {
  state: () => ({
    userId: '',
    token: '',
  }),
  getters: {
    getUserId: (state) => state.userId,
    getToken: (state) => state.token,
  },
  actions: {
    setUserId(userId: string) {
      this.userId = userId
    },
    setToken(token: string) {
      this.token = token
    }
  },
  persist: true
})

